THE ULTIMATE PYTHON HANDBOOK by harry code with
Author:harry, code with
Language: eng
Format: epub
Publisher: UNKNOWN
Published: 2024-07-11T00:00:00+00:00
CHAPTER 6 â CONDITIONAL EXPRESSION
Sometimes we want to play PUBG on our phone if the day is Sunday.
Sometimes we order Ice Cream online if the day is sunny.
Sometimes we go hiking if our parents allow.
All these are decisions which depend on a condition being met.
In python programming too, we must be able to execute instructions on a condition(s) being met.
This is what conditionals are for!
IF ELSE AND ELIF IN PYTHON
If else and elif statements are a multiway decision taken by our program due to certain conditions in our code.
Syntax:
if (condition1): # if condition1 is True
print ("yes")
elif(condition2): # if condition2 is True
print("no")
else: # otherwise
print("maybe")
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Deep Learning with Python by François Chollet(12249)
Hello! Python by Anthony Briggs(9628)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(9555)
The Mikado Method by Ola Ellnestam Daniel Brolund(9531)
Dependency Injection in .NET by Mark Seemann(9070)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(8063)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(7587)
Grails in Action by Glen Smith Peter Ledbrook(7488)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(7309)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(6204)
Becoming a Dynamics 365 Finance and Supply Chain Solution Architect by Brent Dawson(5369)
Microservices with Go by Alexander Shuiskov(5081)
Practical Design Patterns for Java Developers by Miroslav Wengner(4997)
Test Automation Engineering Handbook by Manikandan Sambamurthy(4983)
Kotlin in Action by Dmitry Jemerov(4845)
Angular Projects - Third Edition by Aristeidis Bampakos(4322)
The Art of Crafting User Stories by The Art of Crafting User Stories(3869)
NetSuite for Consultants - Second Edition by Peter Ries(3859)
Practical Vim (for Kathryn Amaral) by Drew Neil(3849)